package com.guguskins.back.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 
 * </p>
 *
 * @author mybatis-plus
 * @since 2021-05-24
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("gu_record")
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public class GuRecord extends Model<GuRecord> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "record_id", type = IdType.AUTO)
    private Long recordId;

    /**
     * 用户id
     */
    private Long recordUserId;

    /**
     * steamId
     */
    private String recordSteamId;

    /**
     * 用户昵称
     */
    private String recordUserNickname;

    /**
     * 0 获得 1 使用
     */
    private Integer recordType;

    /**
     * 1 盲盒 2 道具站 3 合同 4 推广
     */
    private Integer recordSourceType;

    /**
     * 来源id
     */
    private Long recordSourceId;

    /**
     * 1 箱子 2 道具 3 饰品
     */
    private Integer recordItemType;

    /**
     * itemId
     */
    private Long recordItemId;

    /**
     * 目标（描述）
     */
    private String recordDesc;

    /**
     * 备注
     */
    private String recordRemark;

    /**
     * 创建时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime recordCreateTime;


    @Override
    protected Serializable pkVal() {
        return this.recordId;
    }

}
